package middleware

import (
	"github.com/gin-gonic/gin"
	"go_batch_create_orders/utils"
	"net/http"
)

func ApiJwtTokenMiddleware() gin.HandlerFunc {
	return func(context *gin.Context) {
		//requestMethod := context.FullPath()
		data := utils.JsonInit()
		data.SetCode(501)
		data.SetMessage("路由未定义")
		context.JSON(http.StatusNetworkAuthenticationRequired, data)
		context.Abort()
		return
		//if requestMethod == "" {
		//	data.SetMessage("路由未定义")
		//	context.JSON(http.StatusNetworkAuthenticationRequired, data)
		//	context.Abort()
		//	return
		//}
	}
}
